package com.itdct.onflow.core.qo

import com.itdct.onflow.core.type.Delete
import com.itdct.onflow.core.type.Detail
import com.itdct.onflow.core.type.Update
import io.swagger.v3.oas.annotations.media.Schema
import jakarta.validation.constraints.NotNull
import java.io.Serializable

/**
 * @author Zhouwx
 * @date 2025/7/20 14:52:18
 * @version 1.0
 * @description
 */
open class BaseQo : Serializable{
    @Schema(title = "主键id，详情或其他接口需要，一般仅在详情和修改接口中需要")
    @NotNull(message = "请输入id", groups = [Detail::class, Update::class])
    var id: Long? = null

    @Schema(title = "id列表，删除或其他接口需要")
    @NotNull(message = "请输入id列表", groups = [Delete::class])
    var ids: List<Long>? = null

    @Schema(title = "排除某个主键id")
    var excludeId: Long? = null

    @Schema(title = "关键字查询，仅在列表中使用")
    var keyword: String? = null

    @Schema(title = "请求时间，用于和服务器时间对比，防止时间差")
    var rt: String? = null
}